package com.nageoffer.shortlink.project.mq.producer;

import com.nageoffer.shortlink.common.constant.RedisConstant;
import lombok.RequiredArgsConstructor;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;

import java.util.Map;
@RequiredArgsConstructor
@Component
public class RedisMQShortLinkStatsProducer {
    private final StringRedisTemplate stringRedisTemplate;
    public void send(Map<String,String> producerMap){
        stringRedisTemplate.opsForStream().add(RedisConstant.SHORT_LINK_STATS_STREAM_TOPIC_KEY,producerMap);
    }
}
